package com.xiay.stringboot.Exception;

import com.xiay.stringboot.enums.ResultEnum;

/**
 * Created by H-209-FX-XY on 2018/5/9.
 * spring 只会对RuntimeException 进行事务回滚
 */
public class EmployeeException extends RuntimeException {
    private Integer code;


    public EmployeeException(ResultEnum resultEnum) {
        super(resultEnum.getMeg());
        this.code = resultEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }


}
